﻿<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns="http://schemas.microsoft.com/practices/2013/entlib/semanticlogging/etw"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://schemas.microsoft.com/practices/2013/entlib/semanticlogging/etw SemanticLogging-svc.xsd">
  
  <!-- Optional settings for fine tuning performance and Trace Event Session identification-->
  <traceEventService sessionNamePrefix="AExpense"/>

  <!-- Sinks reference definitons used by this host to listen ETW events -->
  <sinks>
    <flatFileSink name="DataAccess" fileName="aExpense.DataAccess.log" >
      <sources>
        <eventSource name="aExpense" level="LogAlways" matchAnyKeyword="2"/>
      </sources>
      <xmlEventTextFormatter formatting="Indented"/>
    </flatFileSink>

    <rollingFlatFileSink name="UserInterface" 
                         fileName="aExpense.UserInterface.log" 
                         rollSizeKB="10" 
                         timeStampPattern="yyyy" 
                         rollFileExistsBehavior="Increment" 
                         rollInterval="Day">
      <sources>
        <eventSource name="aExpense" level="Informational" matchAnyKeyword="4"/>
      </sources>
      <jsonEventTextFormatter formatting="Indented"/>
    </rollingFlatFileSink>

    <sqlDatabaseSink name="SQL-All" 
                     instanceName="AExpense" 
                     connectionString="Data Source=(LocalDB)\v11.0;Initial Catalog=aExpenseV6;Integrated Security=True" 
                     bufferingIntervalInSeconds="3" 
                     bufferingCount="10">
      <sources>
        <eventSource name="aExpense" level="LogAlways"/>
      </sources>
    </sqlDatabaseSink>
   
  </sinks>

</configuration>
